<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>猜数字游戏</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="container">
        <h1>🎯 猜数字游戏</h1>
        <p class="subtitle">我已经想好了一个 1-100 之间的数字，你能猜到吗？</p>
        
        <div class="game-area">
            <div class="input-section">
                <input type="number" id="guessInput" min="1" max="100" placeholder="输入 1-100 的数字" autofocus>
                <button id="submitBtn" onclick="checkGuess()">提交猜测</button>
            </div>
            
            <div id="message" class="message"></div>
            
            <div class="stats">
                <p>已猜次数：<span id="attempts">0</span></p>
                <p>范围提示：<span id="range">1 - 100</span></p>
            </div>
            
            <button id="restartBtn" onclick="restartGame()">重新开始</button>
        </div>
        
        <div id="history" class="history">
            <h3>猜测历史</h3>
            <ul id="historyList"></ul>
        </div>
    </div>
    
    <script src="script.js"></script>
</body>
</html>
